package be.gwi.alfresco.run.model.comparator;

import java.util.Comparator;

import be.gwi.alfresco.run.model.Run;

/**
 * A Run comparator.
 * <p>
 * Compares run.
 * 
 * @author gabriel.willems@gmail.com
 * 
 * @version 1.0
 * @since 1.0
 */
public class RunComparator implements Comparator<Run> {

    /*
     * (non-Javadoc)
     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
     */
    @Override
    public int compare(Run run1, Run run2) {
        return run1.getRunDate().compareTo(
                run2.getRunDate());
    }
}